Back to Contents Previous Next
2. Polling
PROCwimp_poll
This function normally provides the main loop of your application, repeatedly polling the Wimp.
During the loop operation, whenever an event occurs involving your
application eg. an icon has been clicked on, then the Wimp will inform the application via Reason Codes and your programming of the user-functions will determine the action the application takes.
If NULL%=TRUE then PROCuser_null will be called each time a null-event occurs e.g. more or less continuously.
PROCwimp_pollidle(duration,sec%)
Similar to PROCwimp_poll and can be used as an application’s main loop. Its difference is that, unless a non-null event occurs, the Wimp is polled at an interval set by duration.
If NULL%=TRUE then PROCuser_null will be polled at each interval.
If sec%=0 then the duration
value is interpreted as centiseconds.
If sec%=1 then the duration
value is interpreted as seconds.
(duration
can be any real positive number.)
PROCwimp_singlepoll
The same as PROCwimp_poll, except that the Wimp is polled once only and not in a loop. Usually called within the main Wimp poll loop.
If NULL%=TRUE then PROCuser_null will be called once.
Note however, that if this function is called within PROCuser_null, make sure NULL%=FALSE before the call is made (can be set to TRUE afterwards) otherwise recursion will occur.
PROCwimp_singlepollidle(duration,sec%)
The same as PROCwimp_pollidle, except that the Wimp is polled
once after an interval and not in a loop. Usually called within the main Wimp poll loop.
If NULL%=TRUE then PROCuser_null will be called once only after
the period set in duration
.
If sec%=0 then the duration
value is interpreted as centiseconds.
If sec%=1 then the duration
value is interpreted as seconds.
(duration
can be any real positive number.)
Note however, that if this function is called within PROCuser_null, make sure NULL%=FALSE before the call is made (can be set to TRUE afterwards) otherwise recursion will occur.
Top of page Back to Contents Previous Next